<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <style>
      div{
        height: 30px;
      }
    </style>
    <title></title>
  </head>
  <body>
    <div id="app">
       <btn-a></btn-a>
    </div>
    <script src="./vue.js"></script>
    <script>
      var btnB={
         template:`<div :style='css'>？？？</div>`,
         props:["css"]
       }
        Vue.component("btn-a",{
         template:`<p><btn-b :css="color1"></btn-b>
                   <btn-b :css="color2"></btn-b></p>`,
         data(){
           return{
             color1:{background:"gold"},
             color2:{background:"green"},
           }
         },
         components:{
           "btn-b":btnB
         }
       })
      const vm=new Vue({
        el:'#app',
        data:{},
        methods:{},
       })
       
       
    </script>
  </body>
</html>